<?php include("ajaxinlcudes.php");
$q =$_GET['q'];
$radioName = $_GET['r'];
$rs_resources = searchResources($q);
$row_rs_resources = mysql_fetch_assoc($rs_resources);
$totalRows_rs_resources = mysql_num_rows($rs_resources);
?> 
<?php  if($totalRows_rs_resources>0){ ?>
<div class="resource_max">
<table width="100%" border="0" cellpadding="4" cellspacing="0" id="datatable">
  <tr>
    <th>resource id</th>
    <th>category</th>
    <th></th>
  </tr>
  <?php do { ?>
    <tr>
      <td><?php echo "<span style='float:left'>".$row_rs_resources['resource_id']."</span>";
	  if($row_rs_resources['category_id']==7){
	  ?><a rel="<?php echo $f; ?>" href="../resources/<?php echo $row_rs_resources['resource_url']; ?>" >
      <img name="" src="../resources/thump.php?im=<?php echo $row_rs_resources['resource_url']; ?>"  alt="" />
      </a><?php } ?>
     </td>
      <td> <?php echo $row_rs_resources['category_name']; ?> - <?php echo $row_rs_resources['resource_description']; ?></td>
      <td><input type="radio" name="<?php echo $radioName; ?>" id="rad_<?php echo $row_rs_resources['resource_id']; ?>" value="<?php echo $row_rs_resources['resource_id']; ?>"></td>
    </tr>
    <?php } while ($row_rs_resources = mysql_fetch_assoc($rs_resources)); ?>
</table>
</div>
<?php } else { ?>
<div id="error">NO match found for <strong><?php echo $_GET['q'];?></strong></div>
<?php }?>


<?php
mysql_free_result($rs_resources);
?>
